using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.SupplyChain.Purchase;
using HengTong.Model;
using HengTong.Model._Admin;


namespace HengTong.ViewModel.SupplyChain.SysPurchaseRequirementPoolVms
{
    public partial class SysPurchaseRequirementPoolTemplateVm : BaseTemplateVM
    {
        [Display(Name = "需求池名称")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.Name);
        [Display(Name = "需求池编号")]
        public ExcelPropety CodeExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.Code);
        [Display(Name = "总需求金额")]
        public ExcelPropety TotalAmountExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.TotalAmount);
        [Display(Name = "紧急需求数量")]
        public ExcelPropety UrgentCountExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.UrgentCount);
        [Display(Name = "需求池状态")]
        public ExcelPropety StateExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.State);
        [Display(Name = "是否默认需求池")]
        public ExcelPropety IsDefaultExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.IsDefault);
        [Display(Name = "采购负责人")]
        public ExcelPropety PurchaserInChargeExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.PurchaserInChargeId);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysPurchaseRequirementPool>(x => x.Remark);

	    protected override void InitVM()
        {
            PurchaserInChargeExcel.DataType = ColumnDataType.ComboBox;
            PurchaserInChargeExcel.ListItems = DC.Set<FrameworkUser>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysPurchaseRequirementPoolImportVm : BaseImportVM<SysPurchaseRequirementPoolTemplateVm, SysPurchaseRequirementPool>
    {

    }

}
